package com.example.demo6;

public class Account {
    private static Account instance;
    private String username;

    private Account() {
        // 私有构造函数，防止直接实例化
    }

    public static Account getInstance() {
        if (instance == null) {
            instance = new Account();
        }
        return instance;
    }

    public void setCurrentUsername(String username) {
        this.username = username;
    }

    public String getCurrentUsername() {
        return username;
    }
}